import hentai.filter.EncodeFilter;
import hentai.servlet.QAQServlet;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.ServletContextHandler;

import javax.servlet.DispatcherType;
import java.util.EnumSet;

public class RunJetty {
    public static void main(String[] args) throws Exception {
        Server ser = new Server(8090);
        ServletContextHandler handler = new ServletContextHandler();

        // Filter
        handler.addFilter(EncodeFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));

        // Servlet
        handler.addServlet(QAQServlet.class, "/QAQS");

        ser.setHandler(handler);
        ser.start();
    }
}
